<?php

/*
Process Add Category (admin_add_cat.pro.php)
*/

$rank_check = "7";
include "../global.inc.php";

$check = fetch("SELECT id FROM forum_cats2 WHERE cat_name = '$add_cat_name' AND game = '$game'");

if ((!$add_cat_name) OR (!$add_cat_desc))
{
	die(header(error("admin_add_cat.php?game=$game", "Please do not leave any information blank!")));
}

if ($check[id])
{
	die(header(error("admin_add_cat.php?game=$game", "There is already a forum with the name $add_cat_name.")));
}
else
{
	mysql_query("INSERT INTO forum_cats2 (cat_name,cat_desc,game) VALUES ('$add_cat_name','$add_cat_desc','$game')");
	header("Location: admin_add_cat.php?game=$game&error=The+category+$add_cat_name+has+been+added!");
}

?>
